// 再举例一个
import {defineStore} from "@/pinia";

export default defineStore('title', {
  state: () => ({
    title: '小井同学',
    color: 'green',
    age: 18
  }),
  actions: {
    setTitle(title, color) {
      this.color = color
      setTimeout(() => {
        this.title = title
      }, 500)
    },
    setAge(age){
      this.age = age
    }
  }
})
